XPathResult

interface XPathResult

An implementation of the DOM W3C XPathResult interface that represents the result of the XPath expression evaluation.

See also

Functions

Link copied to clipboard
abstract fun asBoolean(): Boolean
Returns the XPath result represented as a boolean.
Link copied to clipboard
abstract fun asNumber(): Double
Returns the XPath result represented as a number.
Link copied to clipboard
abstract fun asSingleNode(): Optional<Node>
Returns an Optional that contains the XPath result represented as a single node or an empty Optional if it does not exist.
Link copied to clipboard
abstract fun asSnapshotNodes(): List<Node>
Returns the XPath result represented as an immutable list of the snapshot nodes.
Link copied to clipboard
abstract fun asString(): String
Returns the XPath result represented as a string.
Link copied to clipboard
abstract fun isBoolean(): Boolean
Returns true if the result type is BOOLEAN.
Link copied to clipboard
abstract fun isIterator(): Boolean
Returns true if the result type is UNORDERED_NODE_ITERATOR or ORDERED_NODE_ITERATOR.
Link copied to clipboard
abstract fun isNumber(): Boolean
Returns true if the result type is NUMBER.
Link copied to clipboard
abstract fun isSingleNode(): Boolean
Returns true if the result type is FIRST_ORDERED_NODE or ANY_UNORDERED_NODE.
Link copied to clipboard
abstract fun isSnapshotNodes(): Boolean
Returns true if the result type is ORDERED_NODE_SNAPSHOT or UNORDERED_NODE_SNAPSHOT.
Link copied to clipboard
abstract fun isString(): Boolean
Returns true if the result type is STRING.
Link copied to clipboard
abstract fun iterateNext(): Optional<Node>
Moves the iterator to the next node in the result set and returns an Optional that contains the Node object referenced by the current iterator.
Link copied to clipboard
abstract fun type(): XPathResultType
Returns the result type.